/////////////////////////////////////////////////////////////////////////////
// Name:        tts_speechsettingsdialog.cpp
// Purpose:     
// Author:      Julian Smart
// Modified by: 
// Created:     20/02/2009 15:36:36
// RCS-ID:      
// Copyright:   (c) Anthemion Software Limited
// Licence:     New BSD License
/////////////////////////////////////////////////////////////////////////////

#include "wx/wx.h"
////@begin includes
////@end includes

#include "tts/tts_speechsettingsdialog.h"

////@begin XPM images
////@end XPM images


/*
 * wxTTSSpeechSettingsDialog type definition
 */

IMPLEMENT_DYNAMIC_CLASS( wxTTSSpeechSettingsDialog, wxDialog )


/*
 * wxTTSSpeechSettingsDialog event table definition
 */

BEGIN_EVENT_TABLE( wxTTSSpeechSettingsDialog, wxDialog )

////@begin wxTTSSpeechSettingsDialog event table entries
////@end wxTTSSpeechSettingsDialog event table entries

END_EVENT_TABLE()


/*
 * wxTTSSpeechSettingsDialog constructors
 */

wxTTSSpeechSettingsDialog::wxTTSSpeechSettingsDialog()
{
    Init();
}

wxTTSSpeechSettingsDialog::wxTTSSpeechSettingsDialog( const wxTTSSpeechSettingsInfo& info, wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    Init();
    Create(info, parent, id, caption, pos, size, style);
}


/*
 * wxTTSSpeechSettingsDialog creator
 */

bool wxTTSSpeechSettingsDialog::Create( const wxTTSSpeechSettingsInfo& info, wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
#ifdef __WXMAC__
    SetWindowVariant(wxWINDOW_VARIANT_SMALL);
#endif

////@begin wxTTSSpeechSettingsDialog creation
    SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end wxTTSSpeechSettingsDialog creation

    m_speechSettingsPanel->SetInfo(info);
    return true;
}


/*
 * wxTTSSpeechSettingsDialog destructor
 */

wxTTSSpeechSettingsDialog::~wxTTSSpeechSettingsDialog()
{
////@begin wxTTSSpeechSettingsDialog destruction
////@end wxTTSSpeechSettingsDialog destruction
}


/*
 * Member initialisation
 */

void wxTTSSpeechSettingsDialog::Init()
{
////@begin wxTTSSpeechSettingsDialog member initialisation
    m_captionCtrl = NULL;
    m_descriptionCtrl = NULL;
    m_speechSettingsPanel = NULL;
////@end wxTTSSpeechSettingsDialog member initialisation
}


/*
 * Control creation for wxTTSSpeechSettingsDialog
 */

void wxTTSSpeechSettingsDialog::CreateControls()
{    
////@begin wxTTSSpeechSettingsDialog content construction
    wxTTSSpeechSettingsDialog* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 5);

    m_captionCtrl = new wxStaticText( itemDialog1, wxID_STATIC, _("Text to speech settings"), wxDefaultPosition, wxDefaultSize, 0 );
    m_captionCtrl->SetFont(wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetStyle(), wxBOLD, false, wxT("")));
    itemBoxSizer3->Add(m_captionCtrl, 0, wxALIGN_LEFT|wxALL, 5);

    m_descriptionCtrl = new wxStaticText( itemDialog1, wxID_STATIC, _("Configure speech preferences here."), wxDefaultPosition, wxDefaultSize, 0 );
    m_descriptionCtrl->Wrap(400);
    itemBoxSizer3->Add(m_descriptionCtrl, 0, wxALIGN_LEFT|wxALL, 5);

    m_speechSettingsPanel = new wxTTSSpeechSettingsPanel( itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
    itemBoxSizer3->Add(m_speechSettingsPanel, 1, wxGROW|wxALL, 5);

    wxStdDialogButtonSizer* itemStdDialogButtonSizer7 = new wxStdDialogButtonSizer;

    itemBoxSizer2->Add(itemStdDialogButtonSizer7, 0, wxGROW|wxALL, 5);
    wxButton* itemButton8 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStdDialogButtonSizer7->AddButton(itemButton8);

    wxButton* itemButton9 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStdDialogButtonSizer7->AddButton(itemButton9);

    itemStdDialogButtonSizer7->Realize();

////@end wxTTSSpeechSettingsDialog content construction
}


/*
 * Should we show tooltips?
 */

bool wxTTSSpeechSettingsDialog::ShowToolTips()
{
    return true;
}

/*
 * Get bitmap resources
 */

wxBitmap wxTTSSpeechSettingsDialog::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin wxTTSSpeechSettingsDialog bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end wxTTSSpeechSettingsDialog bitmap retrieval
}

/*
 * Get icon resources
 */

wxIcon wxTTSSpeechSettingsDialog::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin wxTTSSpeechSettingsDialog icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end wxTTSSpeechSettingsDialog icon retrieval
}
